﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FSMtoCode.Types
{
    class FSMStateTerm
    {
        private String sId;
        private Boolean bIsFinal;

        public String Id
        {
            get { return sId; }
            set { sId = value; }
        }

        public Boolean IsFinal
        {
            get { return bIsFinal; }
            set { bIsFinal = value; }
        }


        public FSMStateTerm()
        {
           this.sId = Id; 
           this.bIsFinal = IsFinal;           
        }
    }

    class FSMState
    {
        private String sId;
        private String sName;
        private String sEntryAction;
        private String sDoAction;
        private String sExitAction;

        public FSMState()
        {
            this.sId = Id;
            this.sName = Name;
            this.sEntryAction = EntryAction;
            this.sDoAction = DoAction;
            this.sExitAction = ExitAction;
        }        

        public String Id
        {
            get { return sId; }
            set { sId = value; }
        }

        public String Name
        {
            get { return sName; }
            set { sName = value; }
        }

        public String EntryAction
        {
            get { return sEntryAction; }
            set { sEntryAction = value; }
        }

        public String DoAction
        {
            get { return sDoAction; }
            set { sDoAction = value; }
        }

        public String ExitAction
        {
            get { return sExitAction; }
            set { sExitAction = value; }
        }
    }

    class FSMTransition
    {
        public FSMTransition()
        {
            this.sId = Id;
            this.sTrigger = Trigger;
            this.sAction = Action;
            this.sGuard = Guard;
            this.sConnecFrom = ConnecFrom;
            this.sConnecTo = ConnecTo;
            this.bDirectionInverted = DirectionInverted;
        }

        private String sId;
        private String sTrigger;
        private String sAction;
        private String sGuard;
        private String sConnecFrom;
        private String sConnecTo;
        private Boolean bDirectionInverted;
        private List<String> lstTriggerParam = new List<String>();
        private List<String> lstActionParam = new List<String>();

        public String Id
        {
            get { return sId; }
            set { sId = value; }
        }

        public String Trigger
        {
            get { return sTrigger; }
            set { sTrigger = value; }
        }

        public String Action
        {
            get { return sAction; }
            set { sAction = value; }
        }

        public String Guard
        {
            get { return sGuard; }
            set { sGuard = value; }
        }

        public String ConnecFrom
        {
            get { return sConnecFrom; }
            set { sConnecFrom = value; }
        }

        public String ConnecTo
        {
            get { return sConnecTo; }
            set { sConnecTo = value; }
        }

        public Boolean DirectionInverted
        {
            get { return bDirectionInverted; }
            set { bDirectionInverted = value; }
        }

        public List<String> TriggerParam
        {
            get { return lstTriggerParam; }
            set { lstTriggerParam = value; }
        }

        public void SaveTriggerParam(String var)
        {
            lstTriggerParam.Add(var);
        }

        public List<String> ActionParam
        {
            get { return lstActionParam; }
            set { lstActionParam = value; }
        }

        public void SaveActionParam(String var)
        {
            lstActionParam.Add(var);
        }
       
    }
}
